{erl_opts, [debug_info]}.
{deps, []}.

{project_plugins, [
    {erlfmt, "v1.0.0"},
    {rebar3_format, "v1.2.0"},
    {rebar3_lint, "v1.0.2"},
    {rebar3_proper, "v0.12.1"},
    {rebar3_path_deps, "v0.4.0"},
    {coveralls, "v2.2.0"}
]}.

{format, [
    {files, ["apps/*/src/*.erl", "apps/*/include/*.hrl", "**/rebar.config"]},
    %% The erlfmt formatter interface
    {formatter, erlfmt_formatter}
]}.

{overrides, [
    {override, erlzmq, [
        {pre_hooks, [
            {compile, "make -C c_src"},
            {clean, "make -C c_src clean"}
        ]},
        {plugins, [pc]},

        {provider_hooks, [
            {post, [
                {compile, {pc, compile}},
                {clean, {pc, clean}}
            ]}
        ]}
    ]},
    % old lint plugin causes conflict with rebar3 lint command see # ISSUE
    {override, prometheus_process_collector, [{plugins, []}]},
    {override, accept, [{plugins, []}]}
]}.

{xref_checks, [undefined_function_calls, undefined_functions]}.

{dialyzer, [
    {warnings, [
        error_handling,
        race_conditions,
        %underspecs,
        unmatched_returns
        %unknown
        %overspecs,
        %specdiffs
    ]}
]}.

{relx, [
    {release, {antidote, "0.2.2"}, [antidote]},
    {dev_mode, false},
    % do not expect Erlang runtime at deployment site
    {include_erts, true},

    % application environment
    {sys_config_src, "config/sys.config.src"},
    % vm arguments passed when starting the Erlang VM
    {vm_args_src, "config/vm.args.src"},

    {overlay, [
        % copy nested configuration file(s)
        {copy, "config/network.config", "releases/{{release_version}}/network.config"}
    ]},

    % create start script with additional features
    {extended_start_script, true}
]}.

{cover_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "_build/test/cover/*.coverdata"}.
{coveralls_service_name, "github"}.
